from openpyxl import load_workbook
import pandas as pd

def update_sheet(file_path, sheet_name, update_df):
    # read excel file
    wb = load_workbook(file_path)

    # delete target sheet
    del wb[sheet_name]

    # create sheet with expected data
    with pd.ExcelWriter(file_path, engine='openpyxl') as writer:
        writer.book = wb
        update_df.to_excel(writer, sheet_name = sheet_name, index=False)
    
    return 'Updated data.'